<!DOCTYPE html>
<html data-theme="light">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0">
        <link rel="icon" type="image/png" sizes="128x128" href="/static/assets/icons/favicon-128x128.png">
        <title>Khoj - Settings</title>
        <link rel="stylesheet" href="/static/assets/pico.min.css">
        <link rel="stylesheet" href="/static/assets/khoj.css">
    </head>
    <body class="khoj-configure">
        <div class="khoj-header-wrapper">
            <div class="filler"></div>
            <div class="khoj-header">
                <a class="khoj-logo" href="https://khoj.dev" target="_blank">
                    <img class="khoj-logo" src="/static/assets/icons/khoj-logo-sideways-500.png" alt="Khoj"></img>
                </a>
                <nav class="khoj-nav">
                    <a class="khoj-nav" href="/chat">Chat</a>
                    <a class="khoj-nav" href="/">Search</a>
                    <a class="khoj-nav khoj-nav-selected" href="/config">Settings</a>
                </nav>
            </div>
            <div class="filler"></div>
        </div>
        <div class=”content”>
            {% block content %}
            {% endblock %}
        </div>
    </body>
    <style>
        html, body {
            width: 100%;
            margin: 0;
            padding: 0;
        }
        @media only screen and (max-width: 600px) {
            body {
                display: grid;
                grid-template-columns: 1fr;
                grid-template-rows: 1fr auto auto auto minmax(80px, 100%);
            }
            body > * {
                grid-column: 1;
            }

            div.filler {
                display: none;
            }

            body.khoj-configure {
                padding: 0;
            }

            div.section {
                padding: 12px;
            }
        }

        img.khoj-logo {
            max-width: none!important;
        }
        div.khoj-header-wrapper{
            display: grid;
            grid-template-columns: 1fr min(70vw, 100%) 1fr;
        }
        .page {
            display: grid;
            grid-auto-flow: row;
            gap: 32px;
        }
        .section {
            display: grid;
            justify-self: center;
        }

        div.instructions {
            font-size: large;
        }

        .section-title {
            margin: 0;
            padding: 0 0 16px 0;
            font-size: 32;
            font-weight: normal;
        }
        .section-cards {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            justify-items: start;
        }
        .card {
            display: grid;
            grid-template-rows: repeat(3, 1fr);
            gap: 8px;
            padding: 24px 16px;
            width: 320px;
            height: 180px;
            background: white;
            border: 1px solid rgb(229, 229, 229);
            border-radius: 4px;
            box-shadow: 0px 1px 3px 0px rgba(0,0,0,0.1),0px 1px 2px -1px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .card-title-row {
            display: grid;
            grid-template-columns: auto 1fr;
            padding: 0;
            gap: 12px;
        }
        .card-icon {
            width: 40px;
            height: 40px;
        }
        .card-title {
            font-size: 20px;
            font-weight: normal;
            margin: 0;
            padding: 0;
            align-self: center;
        }
        .card-title-text {
            vertical-align: middle;
        }
        .card-description {
            margin: 0;
            color: grey;
            font-size: 16px;
        }
        .card-button-row {
            display: grid;
            grid-template-columns: auto;
            text-align: right;
        }
        .card-button {
            border: none;
            font-weight: bold;
            color: rgb(64,64,64);
            background: transparent;
            font-size: 16px;
            cursor: pointer;
            margin: 0;
            padding: 0;
            height: 32px;
            text-align: right;
        }
        .primary-button {
            border: none;
            color: white;
            padding: 15px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
        }

        button.card-button {
            color: rgb(255, 136, 136);
            background: transparent;
            font-size: 16px;
            cursor: pointer;
            margin: 0;
            padding: 0;
            height: 32px;
            text-align: right;
            text-align: left;
        }

        button.card-button.happy {
            color: rgb(0, 146, 0);
        }

        img.configured-icon {
            max-width: 16px;
        }

        div.card-action-row.enabled{
            display: block;
        }

        img.configured-icon.enabled {
            display: inline;
        }

        div.card-action-row.disabled,
        img.configured-icon.disabled {
            display: none;
        }

        .loader {
            border: 16px solid #f3f3f3; /* Light grey */
            border-top: 16px solid var(--primary);
            border-radius: 50%;
            width: 16px;
            height: 16px;
            animation: spin 2s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }


        div.finalize-actions {
            grid-auto-flow: column;
            grid-gap: 24px;
        }

        @media screen and (max-width: 600px) {
            .section-cards {
                grid-template-columns: 1fr;
            }
        }
    </style>
</html>
